<extend name="Public/layout" />

<block name="body">

    <?php $colors = ['#dd4b39','#f39c12','#0073b7','#00c0ef','#00a65a'];?>

    <div class="row">
        <div class="col-md-3 treeview-wrap pr15-md">
            <div class="box box-widget widget-user-2 flat" >
                <div class="widget-user-header bg-yellow flat"  style="background:#3c8dbc !important;color:white;">
                    <span style="font-size:20px;">广告位</span>
                </div>
                <div class="box-footer no-padding" >
                    <ul class="nav nav-stacked">
                        <li <?php if(!$category):?>class='active'<?php endif;?>>
                            <a href="{:U('poster/index')}" style="border-left-color:#ffffff;">全部</a>
                        </li>
                        <?php foreach(json_decode(C('POSTER_CATEGORY'),true) as $k=>$v):?>
                        <li <?php if($key==$category):?>class='active'<?php endif;?>>
                            <a href="{:U('index',array('category'=>$v['category']))}" class="pjax" style="border-left-color:<?php echo $colors[$k%count($colors)];?>">
                                {$v['label']}
                            </a>
                        </li>
                        <?php endforeach;?>
                    </ul>
                </div>
            </div>
        </div>
        <div class="col-md-9">
            {:W('Datatable/render',array( 'listData'=>$listData, 'cfg'=>$cfg ))}
        </div>
    </div>
</block>